home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.2 KB | 55 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item forwarded by NORVELL.J to SHAYER1
-
- Item 8698711 1-Nov-89 13:26
-
- From: D0377 Software Supply, Steve Brecher,PRT
-
- To: NORVELL.J Norvell, Joel
-
- cc: MACAPP.TECH$ MacApp Technical
- DISHON.D Dishon, Danny
- FIFTHGENSYS Fifth Generation Sys, S Nauman,PRT
-
- Sub: Re: A bug with Suitcase.
-
- Joel,
-
- Fixed in Suitcase II 1.2.6, coming soon. To work around the problem, I suggest
- you change
-
- aMenu := GetMenu(rsrcID);
- { Don't die because resource not found - just return NIL handle }
- FailResError;
-
- to
- aMenu := GetMenu(rsrcID);
- { Don't die because resource not found - just return NIL handle }
- IF aMenu = nil { test works around Suitcase II 1.2.5 problem }
- FailResError;
-
- The additional test is harmless and can be left in after Suitcase II 1.2.6 is
- in use.
-
- Technical explanation of the problem: GetMenu calls GetResInfo on the menu
- definition handle field of the menu record to see whether it’s really an MDEF;
- if it isn’t, GetMenu assumes that the field hasn’t been filled in yet with the
- MDEF handle and proceeds to get the MDEF. For font menus, Suitcase II
- substitutes a non-resource MDEF for the real one. If Suitcase II’s GetResInfo
- patch sees that the ROM GetResInfo returns -192, it makes further checks to see
- if the call is from GetMenu and if the handle is the substitute MDEF handle.
- If these checks pass, the patch returns 'MDEF' to GetMenu as the resource type.
- But the patch does not clear ResErr. Only on the second or subsequent call to
- GetMenu for a particular menu will this be a problem, as on the first call
- Suitcase II will not have substituted the MDEF yet. This problem has not been
- brought to light before because it is rare for applications to both (1) call
- GetMenu multiple times on the same menu and (2) check ResError after the call.
-
- It's possible that the times your program worked (i.e., when you were using
- debugger calls) you were looking the first time GetMenu was called for this
- particular menu.
-
- Steve
-
-